<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="css/common.css" />
<link rel="stylesheet" type="text/css" href="css/dl.css" />
<link rel="stylesheet" type="text/css" href="css/jgxxgl1.css" />
<script type="text/javascript" src="js/message.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.pagination.js"></script>
<script src="js/jquery.lightbox_me.js" type="text/javascript"
	charset="utf-8"></script>
<script type="text/javascript" src="js/login.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
	$("#Pagination").pagination("15");
    });

    //清除录入文本信息
    function clearinfo1() {
	document.getElementById("teamname").value = "";

    }
    function clearinfo2() {
	document.getElementById("contact").value = "";

    }
    function clearinfo3() {
	document.getElementById("contactNum").value = "";

    }

    //照片预览方法
    function imgPreview(fileDom) {
	//判断是否支持FileReader
	if (window.FileReader) {
	    var reader = new FileReader();
	} else {
	    alert("您的设备不支持图片预览功能，如需该功能请升级您的设备！");
	}
	//获取文件
	var file = fileDom.files[0];
	var imageType = /^image\//;
	//是否是图片
	if (!imageType.test(file.type)) {
	    alert("请选择图片！");
	    return;
	}
	//读取完成
	reader.onload = function(e) {
	    //获取图片dom
	    var img = document.getElementById("preview");
	    //图片路径设置为读取的图片
	    img.src = e.target.result;
	};
	reader.readAsDataURL(file);
    }

  
    //表单提交前的校验
    function beforeSubmit22() {
        var myMsg = "";
        //alert(document.getElementById("teamname").value);
            if ($("#teamname").val() == "") {            
                myMsg = "您的姓名或团队名称不能为空！";
                alert(myMsg)
                return false;
            }    
             if ($("#career").val() == "") {
                myMsg = "职称不能为空！";
                alert(myMsg)
                return false;
            }           
            
            if ($("#contact").val() == "") {
                myMsg ="联系人不能为空！";
                alert(myMsg)
                return false;
            }            
            if ($("#contactNum").val() == "") {
                myMsg ="联系电话不能为空！";
                alert(myMsg)
                return false;
            }   
             if ($("#detail").val() == "") {
                myMsg ="具体内容不能为空！";
                alert(myMsg)
                return false;
            }   
            if ($("#photoFile").val() == "") {
                myMsg ="具体内容不能为空！";
                alert(myMsg)
                return false;
            }   
                                   
            //长度校验
             if (!checkLength($("#teamname").val(), 20)) {
                myMsg = "您的姓名或团队名称长度超限！"
                alert(myMsg)
                return false;
            }
            if (!checkLength($("#career").val(), 10)) {
                myMsg ="职称长度超限！";
                alert(myMsg)
                return false;
            }
            //手机号校验
            if (!checkPhoneNum($("#contactNum").val())) {
                    myMsg = "手机号不符合格式！";
                    alert(myMsg)
                    return false;
                }
             if (!checkLength($("#contact").val(), 10)) {
                myMsg = "联系人长度超限！";
                 alert(myMsg)
                 return false;
            }
            
            if (!checkLength($("#detail").val(), 200)) {
                myMsg = "描述长度超限！";
                alert(myMsg)
                return false;
                }              
    }
</script>
<title>人力资源</title>
</head>
<body>
	<!--head start-->
	<div class="head system_head">
		<div class="head-topbg">
			<div class="head-top">
				<div class="head-logo">
					<img src="images/logo.png" />
				</div>
				<div class="head-search">
					<form action="###" method="post">
						<input type="text" class="text" /> <input type="submit"
							class="submit" value="" />
					</form>
				</div>
				<div class="head-login">
					<ul>
						<li>中关村四小</li>
						<li><a href="###" class="green" id="cmd_login">登录</a><a
							href="###">(退出)</a></li>
						<li><a href="regist01.jsp">注册</a></li>
					</ul>
				</div>
				<div class="head-right">
					<a href="###" class="setup"> <img src="images/Cogwheel.png" />
					</a>
					<div class="email">
						<a href="###"> <img src="images/email-icon.png" />
						</a> <span>12</span>
					</div>
				</div>
			</div>
		</div>
		<div class="nav" id="nav">
			<ul>
				<li><a href="index.jsp" target="_top">首页</a></li>
				<li><a href="ersp_res_stand.html" target="_top">基础设施预约</a></li>
       			<li id="ersp_res_human"><a href="${pageContext.request.contextPath}/qryAllSource_1" target="_top">人力资源预约</a></li>
				<li><a href="ersp_res_course.html" target="_top">课程资源预约</a></li>
				<li><a href="ersp_res_online.html" target="_top">在线资源</a></li>
				<li><a href="ersp_achievement.html" target="_top">成果展现</a></li>
				<li><a href="ersp_res_cust.html" target="_top">定制化资源服务</a></li>
				<li class="li1"><a href="services.html" target="_top">综合服务系统</a></li>
			</ul>
		</div>
	</div>
	
	<div class="my-content">
		<div id="firstpane" class="menu_list">
			<ul>
				<li>我的资源
					<ul>
						<li>资源上架
							<ul>
								<li id="jcss"><a href="jcss.html#jcss">基础设施</a></li>
								<li id="rlzy"><a href="rlzy.jsp#rlzy">人力资源</a></li>
								<li id="class_sourse"><a
									href="class_sourse.html#class_sourse">课程资源</a></li>
								<li id="online_source"><a
									href="online_source.html#online_source">在线资源</a></li>
								<li id="dzhzy"><a href="dzhzy.html#dzhzy">定制化</a></li>
								<li id="Shel_for_approval"><a
									href="Shel_for_approval.html#Shel_for_approval">上架审批</a></li>
							</ul>
						</li>
						<li id="manage"><a href="${pageContext.request.contextPath}/qryAllSource_2">资源管理</a></li>
						<li id="approval"><a href="${pageContext.request.contextPath}/queryItemByStatus?status=1">预约审批</a></li>
					</ul>
				</li>
				<li>我的机构
					<ul>
						<li id="jgxxgl"><a href="jgxxgl.html#jgxxgl">机构信息管理</a></li>
						<li id="jgxxgl1"><a href="jgxxgl1.html#jgxxgl1">机构信息管理</a></li>
						<li id="institutional_user"><a
							href="institutional_user.html#institutional_user">机构用户审核</a></li>
					</ul>
				</li>
				<li>我的收藏
					<ul>
						<li id="zysc"><a href="zysc.html#zysc">资源收藏</a></li>
						<li id="zysc"><a href="zysc.html#zysc">机构收藏</a></li>
					</ul>
				</li>
				<li>成果展现
					<ul>
						<li id="achievements"><a
							href="achievements.html#achievements">成果管理</a></li>
					</ul>
				</li>
				<li>评价管理
					<ul>
						<li id="rate"><a href="rate.html#rate">来自预约者的评价</a></li>
						<li id="provider"><a href="provider.html#provider">来自提供者的评价</a></li>
						<li id="other"><a href="other.html#other">给他人的评价</a></li>
					</ul>
				</li>
				<li id="myfoot"><a href="myfoot.html#myfoot">我的足迹</a></li>
			</ul>
		</div>
		<div class="coright">
			<h2 class="my-bt">
				<span>人力资源</span>
			</h2>
			<div class="content-con">
				<form id="teachForm" name="teachForm" enctype="multipart/form-data"
					action="${pageContext.request.contextPath }/sourseinfo"
					method="post" onsubmit="return beforeSubmit22()">
					<div class="content-con1">
						<span class="bttext">您的姓名或团队名称:</span><input id="teamname"
							name="teacherNm" type="text" /> <a
							href='javascript:clearinfo1();'>修改</a>
					</div>
					<div class="content-con3">
						<span class="bttext">性别:</span>
						<div>
							<input name="gender" type="radio"  checked="checked" value="1"/>男
						</div>
						<div>
							<input name="gender" type="radio" value="2" />女
						</div>
					</div>
					<div class="content-con1">
						<span class="bttext">出生年月:</span><input name="bithday">
					</div>
					<div class="content-con1">
						<span class="bttext">职称:</span><input id="career" type="text" name="job" />
					</div>
					<div class="content-con1">
						<span class="bttext">擅长领域:</span> <select name="speciality">
							<option >数学</option>
							<option>语文</option>
							<option>英文</option>
							<option>物理</option>
						</select>
					</div>
					<div class="content-con1">
						<span class="bttext">联系人:</span><input id="contact" type="text"
							name="contactName" /><a href='javascript:clearinfo2();'>修改</a>
					</div>
					<div class="content-con1">
						<span class="bttext">联系电话:</span><input id="contactNum"
							type="text" name="contactNum" /><a
							href='javascript:clearinfo3();'>修改</a>
					</div>
					<div class="content-con1">
						<span class="bttext">展示方式:</span> <select name="teachType">
							<option>授课</option>
							<option>培训讲座</option>
							<option>其他</option>
						</select>
					</div>
					<div class="content-con2">
						<span class="bttext">具体要求:</span>
						<textarea id="detail" type="text" name="introduction"></textarea>
					</div>
					<div class="content-con2">
						<span class="bttext">个人照片:</span>
						<div class="scpic">
							<p>请上传您的个人照片</p>
							<span><img id="preview" /></span>
							<!-- <a href="###">选择图片</a>  -->
							<!--  <img id="preview" /> -->
							<br /> <br /> <input type="file" name="photoFile"
								onchange="imgPreview(this)" />
						</div>
					</div>
					<div class="clear"></div>
					<div class="bcbutton1">
						<a href="###" class="bccg">保存为草稿</a><input id="submitinfo"
							type="submit" value="提交"/>
					</div>
				</form>
			</div>
		</div>
	</div>
	<div class="clear"></div>
	<div class="pages">
		<div id="Pagination"></div>
		<div class="searchPage">
			<span class="page-sum">共<strong class="allPage">15</strong>页
			</span> <span class="page-go">跳转<input type="text">页
			</span> <a href="javascript:;" class="page-btn">GO</a>
		</div>
		<div class="clear"></div>
	</div>
	<script type="text/javascript" src="js/left.js"></script>
	<script type="text/javascript" src="js/nav.js"></script>
	<div id="sign_up">
		<h3 id="see_id" class="sprited">&nbsp;</h3>
		<span>用户登录</span>
		<div id="sign_up_form">
			<input class="sprited" placeholder="请输入手机号码或邮箱或用户名" /> <input
				class="sprited" placeholder="请输入密码" /><br />
			<div class="jzma">
				<input type="checkbox" /> <span style="color: gray;"
					style="font-size:14px;">记住用户名</span> <a href="###" class="wjma">忘记密码？</a>
			</div>
			<a href="###" class="button">立即登录</a><br />
			<div class="box1">
				<span class="con">还不是我们的用户？</span> <a href="###" class="zc">立即注册</a>
			</div>
		</div>
	</div>
</body>

</html>
